Python Interview Questions and Answers
Question: Why can't I use an assignment in an expression?Answer:Many people used to C or Perl complain that they want to use this C idiom:
|
Most helpful rated by users:
- What is Python?
- How do I share global variables across modules?
- How do you set a global variable in a function in Python?
- Why can\'t I use an assignment in an expression?
- What are the rules for local and global variables in Python?